dopewars configuration files
A dopewars server, or a
client (in single-player mode) can be heavily configured by the means
of dopewars configuration files. Clients used to connect to multiplayer
servers can also be configured by the same means, but almost all of these
settings will be overridden on connecting to the server (although the server
location settings Port and Server are still useful).
The order of making dopewars settings is as follows:-
- The global configuration file (if present) /etc/dopewars
- The user-specific file (if present) ~/.dopewars
- (Windows only) The file dopewars-config.txt in the current
directory
- Options specified on the command line
Settings in a configuration file can set numbers, strings or "string lists".
A numerical value is set with a command such as Port=7902 (which sets
the TCP port for mulitplayer connections to 7902).
String (text) values are set with commands such as BankName='the bank'
(which sets the name of the bank). Notice that string values must be
enclosed in quotes. Strings in double quotes understand escapes such as "\t";
strings in single quotes do not treat backslash characters specially, and
so should be used for Windows pathnames.
A string list is used for setting an array of strings; for example
SubwaySaying = { "Saying 1", "Saying 2", "Saying 3" } sets up three
"subway sayings". A string list consists of a list of strings, separated by
commas and wrapped with braces - { and } characters. Single strings in a
string list can be replaced individually - for example
SubwaySaying[3]="Third Saying" replaces the third string (which was
previously "Saying 3"). The number of strings in the list
"List" can be set with the variable NumList - for example,
NumSubwaySaying=4 dimensions the SubwaySaying list to contain
four strings.
Whitespace and line breaks are ignored in the configuration files; comments
can be used, and extend from a '#' character to the end of the current line,
or are enclosed by C-style /* and */ symbols. See the
example configuration file for a demonstration.
Valid configuration file settings are listed below. The examples given
generally reproduce the default behaviour; obviously you are free to replace
the parts in italics to customise your own server and client.
- Port=7902
- Tells the dopewars client to look for a server on port 7902, and
tells the dopewars server to bind to port 7902 and wait for connections.
This can be overridden with the -p
command line option.
- Server="localhost"
- Tells the dopewars client to look for a server at the address
localhost. Dotted quad (e.g. 127.0.0.1) addresses may also be used here.
If this variable is set to one of the three "special" names
(MetaServer), (Prompt), or (Single) (including the
brackets) then the client will not connect to a server but instead
list the servers available at the metaserver, prompt the user to enter a
server name and port, or play in single player mode, respectively.
This option can be overridden with the -o
command line option (but be sure to protect the brackets from the shell
if you use one of the "special" names).
- HiScoreFile="/var/lib/dopewars.sco"
- Tells the dopewars server (or the client, if running in single-player
mode, not connected to a server) to use the file /var/lib/dopewars.sco
to store high scores. This can be overridden with the -f
command line option.
- Pager="more"
- Sets the pager used to display multi-page output in an interactive server
to more. ("less" is a popular alternative)
- ConfigVerbose=0
- Prints extra feedback information when processing the config. file if set
to 1; this only takes affect, of course, after the ConfigVerbose variable is
set, and then remains in force until it is reset again.
- MetaServer.Active=1
- Tells the dopewars server to report its status to the
metaserver. If 1
is replaced by 0 (zero) the server will not report to the metaserver.
This setting, if set to 1, can be overridden by the -S
command line option.
- MetaServer.Name="dopewars.sourceforge.net"
- Tells dopewars that the metaserver is located at
dopewars.sourceforge.net. See the
metaserver page, and below, for information
about connecting to the dopewars metaserver via. a proxy web server.
- MetaServer.Port=80
- Instructs dopewarsclient that the metaserver can be found on TCP port
80. This is the standard HTTP port for Web access. (You shouldn't need
to change this, even if you connect via. a proxy.)
- MetaServer.ProxyName="proxy.com"
- Sends all requests to the metaserver via. the web proxy at proxy.com.
If this is set to a blank string (the default) then the connection to the
metaserver is made directly.
- MetaServer.ProxyPort=8080
- Connects to the web proxy on port 8080. (It then connects to the
metaserver on the port specified by MetaServer.Port.) This variable is ignored
if MetaServer.ProxyName is blank.
- MetaServer.Path="/metaserver.php"
- Tells dopewars that the PHP script on the metaserver, for server
registration (server mode) or listing the available servers (client mode) is
/metaserver.php.
- MetaServer.Comment="dopewars
server"
- Sets the comment for your server, which appears on the list of servers
maintained by the metaserver, to dopewars server.
- MetaServer.LocalName="dope-serv.com"
- Tells the metaserver that the preferred hostname of your dopewars server
machine is dope-serv.com. By default, the metaserver tries to ascertain
your domain name from the connection, and this can fail if you connect via.
a proxy server, or if DNS does not properly translate your IP address to your
domain name. You must also set MetaServer.Password to the password given to
you by the metaserver
maintainer for this to work. A blank LocalName can also be used with a
suitable password to identify "your" server, even if its IP changes.
See the metaserver page for more details.
- MetaServer.Password="auth"
- Uses the password auth to authenticate your dopewars server's
hostname (see MetaServer.LocalName above) with the metaserver.
- NumLocation=8
- Sets the number of locations in the game to 8. Note that if too
many locations are specified, the client may not be able to display them
all!
- Location[4].Name="Manhattan"
- Sets the name of the 4th location in the game to Manhattan.
The index within the square brackets can range from 1 to whatever
NumLocation is set to above, or an error will be reported.
- Location[4].PolicePresence=90
- Sets the police presence in the 4th location to 90%. This
affects how likely it is for the police to attack players at each location
when arriving, dropping drugs, or attacking other players.
- Location[4].MinDrug=4
- Sets the minimum possible number of different drugs that will be on sale
to players in location number 4 to 4.
- Location[4].MaxDrug=10
- Sets the maximum possible number of different drugs that will be on sale
to players in location number 4 to 10.
- LoanShark=1
- Makes the loan shark pop up when players visit location number 1.
To stop the loan shark from appearing at all (making it rather difficult to
pay off debts) set this number to something which is not a valid location,
such as 0 (zero).
- Bank=1
- Makes the bank appear when a player visits location 1 (the Bronx).
- GunShop=2
- Players can visit the gun shop in location number 2 (the
Ghetto).
- RoughPub=2
- Players can visit the rough pub to hire bitches in location number
2.
- LoanSharkName="the Loan Shark"
- The loan shark is known by the name "the Loan Shark" during the game.
- BankName="the bank"
- The bank is known by the name "the bank" during the game.
- GunShopName="Dan's House of Guns"
- The gun shop is known by the name "Dan's House of Guns" during
the game.
- RoughPubName="the pub"
- The pub is known by the name "the pub" during the game.
- NumDrug=12
- Sets there to be 12 different types of drug in the game.
- Drug[6].Name="MDA"
- Sets the name of the 6th drug to be MDA.
- Drug[6].MinPrice=1500
- Sets the usual minimum price of the 6th drug (in the absence of
"special events" such as drug busts) to be $1,500.
- Drug[6].MaxPrice=4400
- Sets the usual maximum price of drug number 6 to be $4,400.
- Drug[1].Cheap=1
- Tells dopewars that drug 1 (by default, Acid) can occasionally
be especially cheap (if this is set to 0, zero, this does not happen).
- Drug[1].CheapStr="The market is flooded with cheap
home-made acid!"
- Sets the message to display to alert players that drug number 1
is especially cheap.
- Drugs.CheapDivide=4
- Tells dopewars that whenever a drug is "specially" cheap, divide the
normal price distribution (between Drug[x].MinPrice and Drug[x].MaxPrice) by
4.
- Drug[4].Expensive=1
- Tells dopewars that drug 4 (normally Heroin) can occasionally be
particuarly expensive (0, zero, cancels this).
- Drugs.ExpensiveStr1="Cops made a big %s bust! Prices are
outrageous!"
- Sets the string that is displayed when any drug is particularly
expensive. This is a standard C-style format string - i.e. the %s is
replaced by the name of the drug which is expensive. This string is
displayed 50% of the time for expensive drugs.
- Drugs.ExpensiveStr2="Addicts are buying %s at ridiculous
prices!"
- Sets the string which is used for expensive drugs the other 50% of the
time.
- Drugs.ExpensiveMultiply=4
- Tells dopewars that whenever a drug is "specially" expensive, multiply the
normal price distribution (between Drug[x].MinPrice and Drug[x].MaxPrice) by
4.
- NumGun=4
- Configures the game to have 4 guns available to players at the
gun shop.
- Gun[3].Name="Ruger"
- Sets the name of the 3rd gun to Ruger.
- Gun[3].Price=2900
- Sets the price in the gun shop of the 3rd gun to $2,900.
Guns offered "on the street" (i.e. by random events) will be priced at 10%
of the value set here.
- Gun[3].Space=4
- Tells dopewars that gun number 3 uses 4 spaces in the
inventory - i.e. carrying one of these guns uses the same spaces as 4 drugs.
- Gun[3].Damage=4
- Defines gun number 3 to do up to 4 points of damage.
- PlayerArmour=100
- Sets the percentage armour rating of each player to 100 - this
defines the amount of health that you lose when you are successfully hit.
If 100, you lose the same number of health points as the gun's damage.
If more than 100, you lose fewer health points, and if less than 100, you lose
more health points than the gun's damage. This rating applies only
when you have no bitches.
- BitchArmour=50
- Sets the percentage armour rating of each bitch to 50.
- NumCop=3
- Configures the game to have 3 cops. If you kill the first one, you
will later be attacked by the second one, and so on. (The last cop is 'undead'
and will return even if you kill him.)
- Cop[1].Name=Officer Hardass
- Names the first cop to attack you "Officer Hardass".
- Cop[1].DeputyName=deputy
- Names a solitary deputy accompanying the first cop "deputy".
- Cop[1].DeputiesName=deputies
- Names more than one deputy accompanying the first cop "deputies".
- Cop[1].Armour=4
- Sets the armour rating of the first cop to 4%.
- Cop[1].DeputyArmour=3
- Sets the armour rating of the first cop's deputies to 3%.
- Cop[1].AttackPenalty=30
- When attacking another player, whether you successfully hit them depends
on whether your attack rating is greater than their defence rating, which are
generally numbers between 0 and 100 (think of them as percentages). This
penalises the first cop (and his deputies) by 30% when attacking you.
- Cop[1].DefendPenalty=30
- Penalises the first cop (and his deputies) by 30% when defending
against a player.
- Cop[1].MinDeputies=2
- The first cop will be accompanied by a minimum of 2 deputies.
- Cop[1].MaxDeputies=8
- The first cop will be accompanied by a maximum of 8 deputies.
- Cop[1].GunIndex=0
- The first cop, and his deputies, will carry gun number 0
(zero-based).
- Cop[1].CopGun=1
- The first cop will carry 1 gun.
- Cop[1].DeputyGun=1
- The first cop's deputies will each carry 1 gun.
- LogLevel=2
- Most server log messages are given a priority level, from 0 (most urgent)
to 5 (most verbose). This setting instructs the server only to log messages
from level 0 up to 2, inclusive.
- LogTimestamp="[%H:%M:%S] "
- Prefixes all log messages with a timestamp of the form (e.g.)
[16:34:49]. This is a string which is passed as input to the
strftime(3) function. If this is set to a blank string, then no
timestamp is added to log messages.
- NumTurns=31
- Defines the game to end after 31 "days" or turns. If this is set
to 0 (zero) the game never ends for a player, unless they quit or are killed.
- Sanitized=0
- If set to 1, this "sanitizes" the game by removing all drug references
from the random events. To completely remove drug references, of course, you
must also alter the drug names above.
- DrugSortMethod=1
- Tells the dopewars client how to sort the names of available drugs at
each location for display. The default, 1, sorts them in alphabetical
order by their names. The choices are as follows:-
- 1. Sort in forward alphabetical order by name
- 2. Sort in reverse alphabetical order by name
- 3. Sort in order of current price, cheapest first
- 4. Sort in order of current price, most expensive first
- FightTimeout=5
- If a player in a firefight with another player fails to fire back
within 5 seconds, lets his/her enemy have another shot. If this
is set to 0 (zero) timeouts are disabled, and players may take as long
as they like to fire back.
- IdleTimeout=14400
- If a connected player in a game does nothing to interact with the
server for 14400 seconds, he/she will be automatically disconnected.
- ConnectTimeout=300
- If a player takes more than 300 seconds to complete the process
of connecting or disconnecting to the server, the server will sever the
connection.
- MaxClients=20
- Prevents more than 20 clients from connecting to the server at
any one time.
- AITurnPause=5
- Makes computer-controlled client players run from this machine (not
necessarily AI players that connect to a server run on this machine) wait
5 seconds between moving from location to location - i.e. a turn
takes at least 5 seconds.
- StartCash=2000
- Each player will start the game with $2,000 in cash.
- StartDebt=5000
- Each player will start the game with a debt to the loan shark of
$5,000.
- Names.Bitch="bitch"
- Sets the word used to describe a single "bitch" in the game. Bitch, gun
and drug names are automatically capitalised where necessary by the dopewars
code.
- Names.Bitches="bitches"
- Sets the word used to describe two or more "bitches".
- Names.Gun="gun"
- Sets the word used to describe a single "gun" (for example, it could be
replaced by "knife").
- Names.Guns="guns"
- Sets the word used to describe two or more "guns".
- Names.Drug="drug"
- Sets the word used to describe a single "drug" (for example, it could be
replaced by "candy bar" or something similarly innocuous).
- Names.Drugs="drugs"
- Sets the word used to describe two or more "drugs".
- Names.Month="12-"
- Sets the text which is displayed on the client's screen to the immediate
left of the current turn (by default, a "turn" is a day, and so this part
is the month, in displaying the date in MM-DD-YYYY format)
- Names.Year="-1984"
- Sets the text displayed to the immediate right of the current turn (by
default, the year).
- Prices.Spy=20000
- Sets the price to pay a bitch to spy on another player to be
$20,000.
- Prices.Tipoff=10000
- Sets the price to pay a bitch to tip off the cops to another player to be
$10,000.
- Bitch.MinPrice=50000
- Sets the minimum price for a bitch at the Rough Pub to be $50,000.
Note that prices for bitches "on the street" (i.e. those that are offered
by random events) are produced by dividing the normal bitch price
distribution by 10.
- Bitch.MaxPrice=150000
- Sets the maximum price for a bitch to $150,000.
- SubwaySaying= { "First saying", "Second saying",
"Third saying" }
- Sets the list of things which the lady you sometimes meet on the subway
says to you; one of "First saying", "Second saying" and
"Third saying" will be displayed each time. Any previous sayings will
be erased. Note that individual sayings can be overwritten by appending an
array suffix to the variable name - for example, to replace
"Third saying" with "3rd saying" the following command would
suffice:-
SubwaySaying[3]="3rd saying"
- NumSubwaySaying=5
- Sets there to be 5 distinct things that the lady on the subway
says to you. If this number is greater than the old number of sayings, the
newly added sayings will be blank; if it is smaller, the sayings that are now
beyond the end of the list will be deleted.
- Playing= { "Song 1", "Song 2", "Song 3" }
- Sets the list of things which you can sometimes hear playing while
jetting; one of "Song 1", "Song 2" or "Song 3" will be
displayed. See the help for SubwaySaying for more details.
- NumPlaying=4
- Sets there to be 4 distinct things which you can sometimes hear
playing.
- StoppedTo= { "have a beer", "smoke a joint", "smoke a cigar",
"smoke a Djarum", "smoke a cigarette" }
- Sets the list of things which you sometimes stop to do while jetting;
see SubwaySaying for more details.
- NumStoppedTo=5
- Sets there to be 5 distinct things which you can stop to do.
- DrugValue=1
- If non-zero, then the server will keep track of the price you paid for
any drugs, and clients will display this information if available.
Last update: 17-06-2001